perm filename KIMKEY.DGL[UP,DOC] blob
sn#379721 filedate 1978-09-12 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00007 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 Abstract:
C00004 00003 Basic structure:
C00010 00004 Associating strings with Klavier keys:
C00014 00005 Prompt charactors:
C00016 00006 Key string delimiters:
C00018 00007 Commands to the editor loop:
C00023 ENDMK
C⊗;
Abstract:
This program is designed to enable an organ keyboard panel
attached to the KIM to act as an extended text editor in conjunction
with a teletype. The structure of the program is designed
to enable very fast input of musical scores into Leland Smith's
Manuscript program. One is able to enter note data quickly from
the organ keyboard, and to edit this from the TTY.
Basicly the program allows strings of charactors to be
associated with keys of the organ keyboard such that when they
are depressed, the string is entered into a text line on the user's
TTY. These strings can be any arbitrary set or length of charactors.
Provision is made to enter these string-key associations
from a text file or on line.
Editing of text lines is made possible by an extensive set
of line editing commands. In addition, there is a small, but
hopefully adequate SOS-type editor for dealing with groups of lines.
In the rest of this document, the term "Klaver" or "keyboard"
will refer to the organ keyboard, the term "TTY" will be reserved
for a teletype. The term "keyboard" will never be used to refer to
a TTY. The "α", "β" and "⊗" charactors stand for <control>, <meta>
and either/both <control><meta> respectively.
Basic structure:
Basic line editor commands:
This program sets up two line editors, one for a
Klavier (organ keyboard) panel, and one for the TTY of the controling job.
Depressing keys on the Klavier causes the associated strings
to be written into the Klavier's line editor. The character "/" is
used to delimit these strings.
Typing at a TTY puts that text into the TTY line editor (as usual).
The contents of these line editors is then merged according to commands
and written to an internal line buffer which resembles a mini-SOS
editor. There the lines can be further edited or extended. Then
the contents of the line buffer is written out to a file.
The method of using this program is to put notes, rhythmic
values and other frequently used marks into the Klavier keys,
and to edit what is entered on the Klavier from the TTY.
There are various ways of changing and augmenting
what has been written into the Klavier's line editor. (For the complete
list of commands see below.)
The contents of the TTY line editor can be deposited into the
end of the Klavier's line editor by the ⊗I(nsert) command.
This allows adding to the Klavier's line editor from the TTY line editor.
The Klavier line editor can be loaded into the TTY line editor
by typing <lf> on the TTY. The edited text is put back into
the Klavier line editor by typing <cr>.
"Writing out" the contents of the Klavier line editor is done by
two commands. Remember that in Leland's manuscript program, a line ended with
the character "/" means to continue taking input for the current
parameter (notes, rhythms, marks, beams, slurs) from the subsequent
line. Ending with ";" means
to start scanning for the next parameter on the next line. So to end a line
and continue the parameter type ⊗/, else ⊗; to end it.
It is also possible to write out lines from the TTY line editor.
The same ⊗/ and ⊗; commands do so. The way this works is as follows:
When ⊗/ or ⊗; is typed, if there is text in the TTY line editor, it is
concatenated to the end of whatever is in the Klavier line editor and then
written out. If nothing has been entered on the Klavier for this line,
then the result is that the TTY line is written out. (If there is stuff
in both editors, the line written out will have the Klavier data first.)
The SOS-like editor:
When a line is activated with ⊗/, ⊗; or <cr>, the line is saved
in an internal line buffer. These stored lines can be retrieved for further
editing from the TTY. To see the lines in the line buffer type ⊗P.
To see line n type n⊗P. To put line n in the TTY
line editor type n⊗E. (Note: don't hold down the ⊗ key while typing
the number, only the letter. This command structure is like in EdSnd
and SeeSnd.)
Writing out a file:
Lines entered are not written out to the output file until
explicitly done so with the ⊗. or ⊗F(ile) command. These write out all lines.
⊗F closes the file and prompts for a new output file name. The output
file name can also be typed before the ⊗F, for instance FOO⊗F writes
out the current file, and opens file FOO for further output.
As a safeguard, the <alt> command and the X (exit) command
also write out remaining lines and close the file before any other
action.
Associating strings with Klavier keys:
File input:
A key can contain a string of type NOTES or MARKS.
The following example will associate "HI THERE" with Klavier key (octal)3,
and "MUMBLE" with key (always octal)7, such that when either of these keys
are depressed, the string will be entered into the Klavier line editor.
(Lower case will be coerced to upper case. Commas and spaces are equivalent.)
MARKS 3, "HI THERE", 7 "MUMBLE";
NOTES are different from MARKS in two respects: First they
are promulgated across each octave of the Klavier, secondly when
a NOTE key is depressed, its octave number is concatenated to the end
of the key's string.
There are two formats for entering NOTES, the first is to
just change one key. It takes an octal integer key number and the string to
associate with that key. For example:
NOTES 3 "DF";
will make keys (always octal)3, 20, 34, 50, and 64 print "DF". (In addition,
the octave number will be added, to wit depressing key 50 will print "DF5".)
(It is possible to set the octave number of key 33 to any value. Key
33 is the C key nearest the center of the Klavier and is defaulted to
octave 4 as in C4.)
The integer is assumed to be a number in the first octave of the keyboard.
(The only keys affected will be the ones ≥ the number modulo 12.)
The second mode for NOTES is to specify all notes, starting from
the lowest C key to the B key. In escence, you are then setting all the keys.
For example:
NOTES "C" "DF" "D" "EF" "E" "F" "GF" "G" "AF" "A" "BF" "B";
Remember that the keys are preloaded with notes in sharps, so if for
instance you left out everything above "EF" above, (i.e. NOTES "C" "DF"
"D" "EF";) then the rest of the black keys would still print in sharps.
Also, even the long form can be preceeded with a number which will
start the process on that note, so you can set subsets of notes that lie
together, for instance:
NOTES 6 "EF" "F" "FS";
would only change those three notes.
MARKS are protected from being overwritten by NOTES.
This is done because of the fact that NOTES affect more than one key and
it would be easy to clobber a marked key with the NOTES command. But
MARKS can overwrite NOTES. (NOTES can overwrite NOTES, likewise for MARKS, of
course. MARKS can be undone with the command -n⊗M, see below.
Prompt charactors:
After the program has done some initial setup questions
(such as which Klavier to read, what input/output file, etc.)
the progam enters the editing loop by printing the character
"⊗" in the lefthand column. This indicates that the program will
accept input from either the TTY or Klavier. Every new line will
be prompted.
To return to the setup level, type <alt>.
Whenever a new line is activated (with ⊗/, ⊗; or <cr>)
the line being written out is first printed on the screen with
a "↓" character in the leftmost column, indicating that this is the
line being saved.
When the <lf> command is given, the "*" prompt character
is printed and the contents of the Klavier line editor is put into
the TTY line editor. When the line is written out with <cr>, it
prints the edited line with the "↓" prompt character.
Key string delimiters:
KimKey delimits successive Klavier keystrokes with the "/"
character which is what Manuscript wants.
When KimKey detects more
than one key depressed, it assumes a chord is being entered and
it delimits keys with ":".
Input from the TTY is not automatically delimited since
this input is considered editorial.
Automatic delimiting works as follows: the delimiter for the
current Klavier keystroke is not printed until the next Klavier keystroke
(since KimKey can't predict whether it will be a chord, or the end of
a line, etc.). The ⊗/ and ⊗; commands force the delimiter out and
terminate the line.
Commands to the editor loop:
( α ≡ <control>, β ≡ <meta>, ⊗ ≡ α and/or/both β.
n is an integer, λ is a filename, and π is NOTE or MARK format.)
Klavier Line editor commands:
⊗/ ≡ write out contents of line editors to
the line buffer, ending the line with "/".
Any contents of TTY line editor are put in after contents of
Klavier line editor.
⊗; ≡ write out line editors as in ⊗/ but with ";" at end.
<alt> ≡ jump out one level
<cr> ≡ write out line with "/" at end (same as ⊗/)
<lf> ≡ put line being written by keyboard into TTY line editor.
This mode is prompted with a "*". The line can be edited
using all the normal features of the TTY line editor.
<cr> activates line editor. The contents of the TTY line editor
is then put back in the Klavier line editor, and Klavier
input can continue from there.
⊗C ≡ Clears Klavier line editor,
also resets octave counter, clears chord, clears "/" delimiter.
text ⊗I ≡ Takes contents of TTY line editor (text) and inserts it at the
end of the Klavier editor.
Line buffer commands:
n⊗D ≡ Deletes line n in the line buffer.
n⊗E ≡ Puts line buffer line n in TTY line editor.
⊗P ≡ Prints all lines entered since last time lines were written out.
n⊗P ≡ Prints line n.
Output file commands:
λ⊗F ≡ Opens file λ (does not do much fancy filename parsing).
Prompts for filename if λ is null.
⊗. ≡ Write out remaining lines in line buffer to file, don't close file.
Klavier key setup commands:
λ⊗L ≡ Reads file λ and loads keys with NOTES and MARKS found there.
Prompts for filename if λ is null.
π⊗M ≡ Treats contents of TTY line editor as a "MARK" command.
(e.g. 7 "FOO"⊗M makes key 7 a mark containing "FOO".)
Allows you to mark keys on-line.
-n⊗M ≡ Unmarks a marked key (no-op otherwise). Subsequent NOTE
command that would write into this key will be able to do so.
Otherwise NOTES cannot overwrite existing MARKS.
π⊗N ≡ Treats contents of TTY line editor as a "NOTE" command.
(e.g. 7 "ES"⊗N makes key 7 a note containing "ES".)
Allows you to change key signatures on-line.
n⊗O ≡ Changes the octave offset to make key 33 (middle C) = octave n.
⊗T ≡ Reset timer (not useful for anything now).
⊗X ≡ Exit program after writing out any remaining lines in
line buffer, and closing file.
Misc. commands:
⊗> ≡ Lock job in core.
⊗< ≡ Unlock job.
TTY Line editor commands: (these are all standard AI line editor commands).
αB<chr> jump back to <chr>
αL<chr> delete back to <chr>
αD delete current chr
αS<chr> search ahead to <chr>
αT swap current chr with last chr
αK<chr> kill chrs up to <chr>
α<space> step ahead, don't overstrike current chr
αI insert mode
α<anything> leave insert mode
<bs> backspace
α<form> jump to first chr in line editor
α<tab> jump to last chr in line editor
α<return> retrieve last line.
<clear> wipe out line.